#include "Log.h"

#include <spdlog/sinks/ansicolor_sink-inl.h>

#ifdef NDEBUG
constexpr auto debug_level{ spdlog::level::level_enum::info };
#else
constexpr auto debug_level{ spdlog::level::level_enum::debug };
#endif // NDEBUG

bool set_level(spdlog::logger& log)
{
	log.set_level(debug_level);
	return true;
}

spdlog::logger& Logger()
{
	static spdlog::logger sl("CommConversion", std::make_shared<spdlog::sinks::ansicolor_stderr_sink_mt>());
	static bool l{ set_level(sl) };
	return sl;
}
